<%@ Page Title="Administrar Alumnos" Language="vb" AutoEventWireup="false" MasterPageFile="~/01ADMINISTRADOR/MPAdmin.Master"
    CodeBehind="admin-estudiante.aspx.vb" Inherits="ASI_2_UFG.admin_estudiante" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="tableform">
        <fieldset>
            <legend>
                <asp:Label ID="lblForm" runat="server" Text="Formulario de Alumnos"></asp:Label>
                <asp:Label ID="lblfile" runat="server" Text="Carga de Alumnos por medio de Excel"></asp:Label>
            </legend>
        </fieldset>
        <asp:LinkButton ID="Form" runat="server">Ver Formulario</asp:LinkButton>&emsp;
            <asp:LinkButton ID="File" runat="server">Subir Archivo</asp:LinkButton>
        <asp:Panel ID="PanelFormulario" runat="server">            
            <table>
                <tr>
                    <td>
                        <asp:Label ID="Label6" runat="server" Text="ID"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="txtID" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="Label1" runat="server" Text="CARNET"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="CARNET" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="Label2" runat="server" Text="APELLIDOS"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="Apellidos" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="Label3" runat="server" Text="NOMBRES"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="Nombres" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="Label4" runat="server" Text="EMAIL"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="Email" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="Label5" runat="server" Text="USUARIO"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="Usuario" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="Label7" runat="server" Text="CLAVE"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="Clave" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="Label8" runat="server" Text="ESTADO"></asp:Label>
                    </td>
                    <td>
                        <asp:DropDownList ID="Estado" runat="server">
                            <asp:ListItem Value="a">ACTIVO</asp:ListItem>
                            <asp:ListItem Value="i">INACTIVO</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="Label9" runat="server" Text="ROL" Visible="False"></asp:Label>
                    </td>
                    <td>
                        <asp:SqlDataSource ID="SQLRol" runat="server" ConnectionString="<%$ ConnectionStrings:ASI2UFG %>"
                            SelectCommand="SELECT r.id_rol, r.nombre FROM ROL AS r WHERE r.nombre='ESTUDIANTE'">
                        </asp:SqlDataSource>
                        <asp:DropDownList ID="ROL" runat="server" DataSourceID="SQLRol" DataTextField="nombre"
                            DataValueField="id_rol">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <asp:ImageButton ID="btnInsertar" runat="server" CssClass="image" ImageUrl="~/IMAGES/funct_add.png" />
                        <asp:ImageButton ID="btonModificar" runat="server" CssClass="image" ImageUrl="~/IMAGES/funct_refresh.png" />
                        <asp:ImageButton ID="btonEliminar" runat="server" CssClass="image" ImageUrl="~/IMAGES/funct_delete.png" />
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <asp:Label ID="lbMensaje" runat="server" Text=""></asp:Label>
                    </td>
                </tr>
            </table>
        </asp:Panel>
        <asp:Panel ID="PanelArchivo" runat="server">
            <table>
                <tr>
                    <td>
                        <asp:Label ID="Label10" runat="server" Text="Archivo: "></asp:Label>
                    </td>
                    <td>
                        <asp:FileUpload ID="FileUp1" runat="server" CssClass="FILE" />
                        <style>
                            .FILE
                            {
                                color: white;
                            }
                        </style>
                    </td>
                    <td>
                        <asp:ImageButton ID="BtonUp" runat="server" CssClass="image" ImageUrl="~/IMAGES/arrow_up.png" />
                        <asp:Label ID="LblArchivo" runat="server" Text=""></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td colspan="3">
                        <asp:Label ID="lblMensaje" runat="server" Text=""></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="Label11" runat="server" Text="Seleccione Hoja"></asp:Label>
                    </td>
                    <td>
                        <asp:DropDownList ID="dropHoja" runat="server">
                        </asp:DropDownList>
                    </td>
                    <td>
                        <asp:ImageButton ID="BtonCargar" runat="server" CssClass="image" ImageUrl="~/IMAGES/funct_accept.png" />
                    </td>
                </tr>
            </table>
        </asp:Panel>
        <table>
            <tr>
                <td colspan="2">
                    <asp:GridView ID="GridEstudiante" runat="server" AutoGenerateColumns="False" CellPadding="4"
                        DataKeyNames="ID" DataSourceID="SQLEstudiante" ForeColor="#333333" GridLines="None">
                        <RowStyle BackColor="#EFF3FB" />
                        <Columns>
                            <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" ReadOnly="True"
                                SortExpression="ID" />
                            <asp:BoundField DataField="CARNET" HeaderText="CARNET" SortExpression="CARNET" />
                            <asp:BoundField DataField="APELLIDOS" HeaderText="APELLIDOS" SortExpression="APELLIDOS" />
                            <asp:BoundField DataField="NOMBRES" HeaderText="NOMBRES" SortExpression="NOMBRES" />
                            <asp:BoundField DataField="EMAIL" HeaderText="EMAIL" SortExpression="EMAIL" />
                            <asp:BoundField DataField="USUARIO" HeaderText="USUARIO" SortExpression="USUARIO" />
                            <asp:BoundField DataField="CLAVE" HeaderText="CLAVE" SortExpression="CLAVE" />
                            <asp:BoundField DataField="ESTADO" HeaderText="ESTADO" SortExpression="ESTADO" />
                            <asp:BoundField DataField="ROL" HeaderText="ROL" SortExpression="ROL" />
                        </Columns>
                        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <EditRowStyle BackColor="#2461BF" />
                        <AlternatingRowStyle BackColor="White" />
                    </asp:GridView>
                    <asp:SqlDataSource ID="SQLEstudiante" runat="server" ConnectionString="<%$ ConnectionStrings:ASI2UFG %>"
                        SelectCommand="SELECT [id_estudiante] AS ID, [CARNET] AS CARNET, [apellidos] AS APELLIDOS, [nombres] AS NOMBRES, [email] AS EMAIL, [usuario] AS USUARIO, [clave] AS CLAVE, [estado] AS ESTADO, r.nombre AS ROL FROM [ESTUDIANTE] , ROL AS r WHERE ESTUDIANTE.id_rol = r.id_rol ">
                    </asp:SqlDataSource>
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
